package com.wit.witmg.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.wit.witmg.entity.Tefdata;
import com.wit.witmg.mapper.TefdataMapper;
import com.wit.witmg.service.ITefdataService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wit.witmg.util.JsonResult;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpServletRequest;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author bob
 * @since 2025-07-10
 */
@Service
public class TefdataServiceImpl extends ServiceImpl<TefdataMapper, Tefdata> implements ITefdataService {

    @Override
    public Object get(HttpServletRequest request, Long dt0, Long dt1) {
        //dt0开始时间，dt1结束时间，返回两个时间之间的数据。
        LambdaQueryWrapper<Tefdata> qw=new LambdaQueryWrapper<>();
        qw.between(Tefdata::getDt,dt0,dt1);
        qw.orderByAsc(Tefdata::getDt);
        return JsonResult.success(list(qw));
    }
}
